package org.example;

import cn.hutool.http.HttpUtil;

import java.util.regex.Pattern;

public class App6 {
    public static void main(String[] args) {

        String s1="PRED-687\n" +
                "PPPE-234\n" +
                "PPPE-224\n" +
                "PRED-680\n" +
                "PPPE-223\n" +
                "PRED-674\n" +
                "PPE-206\n" +
                "PRED-567\n" +
                "PPPE-198";
        String[] split2 = s1.split("\n");
        for (String s : split2) {
            //get 请求  https://u9a9.org/?type=2&search=DASS-406
            String body = HttpUtil.createGet("https://u9a9.org/?type=2&search=" + s).execute().body();
            System.out.println("body = " + body);
            //休眠5秒
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }

        String s="選片\n" +
                "\n" +
                "\uD83D\uDCDA 按主題\n" +
                "\uD83D\uDC69 按女優\n" +
                "\uD83D\uDCA1 新片優先\n" +
                "\uD83D\uDD25 熱度優先\n" +
                "\n" +
                "衣著\n" +
                "\n" +
                "黑絲\n" +
                "過膝襪\n" +
                "運動裝\n" +
                "肉絲\n" +
                "絲襪\n" +
                "眼鏡娘\n" +
                "獸耳\n" +
                "漁網\n" +
                "水着\n" +
                "校服\n" +
                "旗袍\n" +
                "婚紗\n" +
                "女僕\n" +
                "和服\n" +
                "吊帶襪\n" +
                "兔女郎\n" +
                "Cosplay\n" +
                "\n" +
                "身材\n" +
                "\n" +
                "黑肉\n" +
                "長身\n" +
                "軟體\n" +
                "貧乳\n" +
                "美腿\n" +
                "美尻\n" +
                "紋身\n" +
                "短髮\n" +
                "白虎\n" +
                "熟女\n" +
                "巨乳\n" +
                "少女\n" +
                "嬌小\n" +
                "\n" +
                "交合\n" +
                "\n" +
                "顏射\n" +
                "腳交\n" +
                "肛交\n" +
                "痙攣\n" +
                "潮吹\n" +
                "深喉\n" +
                "接吻\n" +
                "口爆\n" +
                "口交\n" +
                "乳交\n" +
                "中出\n" +
                "\n" +
                "玩法\n" +
                "\n" +
                "露出\n" +
                "輪●\n" +
                "調教\n" +
                "綑綁\n" +
                "瞬間插入\n" +
                "痴漢\n" +
                "痴女\n" +
                "男M\n" +
                "泥醉\n" +
                "泡姬\n" +
                "母乳\n" +
                "放尿\n" +
                "按摩\n" +
                "多P\n" +
                "刑具\n" +
                "一日十回\n" +
                "3P\n" +
                "\n" +
                "劇情\n" +
                "\n" +
                "黑人\n" +
                "醜男\n" +
                "誘惑\n" +
                "童貞\n" +
                "時間停止\n" +
                "復仇\n" +
                "年齡差\n" +
                "巨漢\n" +
                "媚藥\n" +
                "夫目前犯\n" +
                "出軌\n" +
                "催眠\n" +
                "偷拍\n" +
                "下雨天\n" +
                "●倫\n" +
                "NTR\n" +
                "\n" +
                "角色\n" +
                "\n" +
                "風俗娘\n" +
                "醫生\n" +
                "逃犯\n" +
                "護士\n" +
                "老師\n" +
                "空姐\n" +
                "球隊經理\n" +
                "未亡人\n" +
                "搜查官\n" +
                "情侶\n" +
                "家政婦\n" +
                "家庭教師\n" +
                "偶像\n" +
                "人妻\n" +
                "主播\n" +
                "OL\n" +
                "\n" +
                "地點\n" +
                "\n" +
                "魔鏡號\n" +
                "電車\n" +
                "處女\n" +
                "監獄\n" +
                "溫泉\n" +
                "洗浴場\n" +
                "泳池\n" +
                "汽車\n" +
                "廁所\n" +
                "學校\n" +
                "圖書館\n" +
                "健身房\n" +
                "便利店\n" +
                "\n" +
                "雜項\n" +
                "\n" +
                "錄像\n" +
                "處女作/引退作\n" +
                "綜藝\n" +
                "節日主題\n" +
                "感謝祭\n" +
                "4小時以上\n" +
                "\n" +
                "\n" +
                "新作藍光無碼色網大全更多好站裸聊\n" +
                "\n" +
                "\n" +
                "\n" +
                "登入\n" +
                "楪\n" +
                "\n" +
                "女優\n" +
                "\n" +
                "楪カレン\n" +
                "\n" +
                "76 部影片\n" +
                "\n" +
                "近期最佳 最近更新 最多觀看 最高收藏\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:00:08\n" +
                "\n" +
                "PRED-687 顔射20發 就算射精 追擊敏感硬梆梆奶頭…徹底的舔好舔滿！高級酒店辣妹 華戀的NTR口交服務 楪可憐\n" +
                "\n" +
                "323 2213369\n" +
                "\n" +
                "\n" +
                "\n" +
                "1:56:40\n" +
                "\n" +
                "PPPE-234 気弱な性格で「嫌」の一言が言えずエロ整体師に恥ずかしいほどイカされ続けた巨乳部活少女 楪可憐\n" +
                "\n" +
                "200 8901285\n" +
                "\n" +
                "\n" +
                "\n" +
                "1:58:09\n" +
                "\n" +
                "PPPE-224 高級精品品牌 自己來測試自家產品 痴女設計師 楪可憐\n" +
                "\n" +
                "409 5234681\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:19:48\n" +
                "\n" +
                "PRED-680 被討厭的黏著老闆全身舔好舔滿！全身敏感帶 性感調教 巨乳秘書 楪可憐\n" +
                "\n" +
                "499 9145690\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:41:45\n" +
                "\n" +
                "PPPE-223 巨乳の生徒が在籍した3年間、抵抗できない状態でいいなりオナホになるまで調教してやった 楪可憐\n" +
                "\n" +
                "523 5213053\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:44:12\n" +
                "\n" +
                "PRED-674 デカ乳ボイン色気ムンムンスケベ接客スナックお姉さんとアフター中出し不倫 楪可憐\n" +
                "\n" +
                "368 9433084\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:28:08\n" +
                "\n" +
                "PPE-206 禁慾一個月後的敏感乳頭被玩弄放濕性交 楪可憐\n" +
                "\n" +
                "690 9284471\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:24:39\n" +
                "\n" +
                "PRED-567 家庭教師可憐老師的款待深吻與中出撒嬌播種性愛的日子 楪可憐\n" +
                "\n" +
                "922 3877728\n" +
                "\n" +
                "\n" +
                "\n" +
                "1:57:08\n" +
                "\n" +
                "PPPE-198 楪可憐中出大亂交解禁特別編 楪可憐\n" +
                "\n" +
                "425 9293349\n" +
                "\n" +
                "\n" +
                "\n" +
                "3:23:23\n" +
                "\n" +
                "PRED-558 綺麗なお姉さんと何もない古民家を愛の巣にして極濃ヤリまくり同棲生活 楪可憐\n" +
                "\n" +
                "385 2672189\n" +
                "\n" +
                "\n" +
                "\n" +
                "3:30:32\n" +
                "\n" +
                "PPPE-190 三線持って東京から沖縄に帰郷！Hcup巨乳の島人AVデビュー3周年でうちなー凱旋やりぶさー！ 楪可憐\n" +
                "\n" +
                "411 1512657\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:37:21\n" +
                "\n" +
                "JUQ-587 マドンナ20周年記念5ヶ月連続！！奇跡のコラボ第3弾！！‘家族の為に捧げたカラダ’中年男たちに弄ばれる、身代わり輪●温泉旅行―。 楪可憐\n" +
                "\n" +
                "734 2463855\n" +
                "\n" +
                "\n" +
                "\n" +
                "1:59:43\n" +
                "\n" +
                "PRED-549 與成為白衣天使的可憐前輩再會 對身心都虛弱的我溫柔療癒優巨乳撒嬌中出住院生活 楪可憐\n" +
                "\n" +
                "581 8206597\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:12:39\n" +
                "\n" +
                "PPPE-183 母親死後子持續吸著姊姊胸部10年 母性把強烈的我培養到這個地步 楪可憐\n" +
                "\n" +
                "554 3733943\n" +
                "\n" +
                "\n" +
                "\n" +
                "1:58:16\n" +
                "\n" +
                "PPPE-174 游泳隊顧問玩具中出輪● 被體力十足的絕倫學生強●的我 楪可憐\n" +
                "\n" +
                "665 6175387\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:31:12\n" +
                "\n" +
                "PRED-541 游泳隊顧問強●輪●中出 大家的偶像可憐老師穿著競技泳裝卑微的大屁股被理智崩潰的男同學持續侵犯高潮的女教師 楪可憐\n" +
                "\n" +
                "657 2915327\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:13:33\n" +
                "\n" +
                "PRED-532 加班、暴風雨、之後中出 對溫柔巨乳可憐前輩的胸部發情持續中出的我 楪可憐\n" +
                "\n" +
                "1 617 8308482\n" +
                "\n" +
                "\n" +
                "\n" +
                "1:58:07\n" +
                "\n" +
                "PPPE-166 「こんな場所で？」「声でバレちゃう！」「ここに射精するの！？」小悪魔な巨乳逆チカンお姉さん 楪可憐\n" +
                "\n" +
                "502 9613147\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:38:24\n" +
                "\n" +
                "PRED-520 好久沒有被中出 身心都滿足了你不在的這三天 欲求不滿的我 跟絕倫公公獨處兩人 楪可憐\n" +
                "\n" +
                "1 502 4027089\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:01:06\n" +
                "\n" +
                "PRED-525 禁欲高潮爆發 再見了 我先去沉溺於快樂的世界 舌尖與口水糾纏專心扭腰 汗水潮水汁水淫蕩飛濺高潮直到極限... 楪可憐\n" +
                "\n" +
                "669 9384769\n" +
                "\n" +
                "\n" +
                "\n" +
                "1:58:20\n" +
                "\n" +
                "PPPE-162 不論何時何出都能馬上插入！巨乳小魔女過激性愛服務 楪可憐\n" +
                "\n" +
                "466 6925513\n" +
                "\n" +
                "\n" +
                "\n" +
                "1:58:38\n" +
                "\n" +
                "PPPE-153 與妻子結婚10年 對巨乳拖油瓶在妻子返鄉3日間用10年分調教讓她理解 楪可憐\n" +
                "\n" +
                "752 9435411\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:25:12\n" +
                "\n" +
                "PPPE-146背叛20年多交情的朋友 跟他女友不只把套子用光了還是繼續無套抽插… 楪可憐\n" +
                "\n" +
                "957 8116466\n" +
                "\n" +
                "\n" +
                "\n" +
                "2:00:09\n" +
                "\n" +
                "PRED-506 搞到我不行般的癡女砲友大姊 馬上口交吞精＆打樁中出持續射精到早上… 楪可憐\n" +
                "\n" +
                "1 174 2627058\n" +
                "\n" +
                "01020304最後 »\n" +
                "\n" +
                "//台灣uu裸聊直播 免費看裸聊表演\n" +
                "\n" +
                " \n" +
                "\n" +
                "Copyright © 2018 Jable.TV All rights reserved\n" +
                "\n" +
                "關於\n" +
                "\n" +
                "投放廣告聯絡我們備用網址\n" +
                "\n" +
                "政策\n" +
                "\n" +
                "18 U.S.C. 2257使用條款濫用報告";

        //定位 最後
        s = s.substring(s.indexOf("最高收藏")+5,s.indexOf("最後"));
//        System.out.println(s);
//        //正则表达式 匹配 汉字
//        int firstChineseChar = findFirstChineseChar(s);
//        //输出第一个汉字
//        System.out.println(s.charAt(firstChineseChar));
        //s 变成多行
//        System.out.println("s = " + s);
        String[] split = s.split("\n");
        for (String line : split) {
            //如果一行就只有一个换行符，就跳过
            if (line.length() == 0) {
                continue;
            }
            int firstChineseChar = findFirstChineseChar(line);
            if (firstChineseChar == -1) {
                continue;
            }
            //截取
            line = line.substring(0,firstChineseChar);
            //按照空格分割
            String[] split1 = line.split(" ");
            //只要第一个
            System.out.println(split1[0]);
        }

    }


    public static int findFirstChineseChar(String str) {
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            // 检查字符是否位于基本汉字Unicode编码范围内
            if (c >= '\u4e00' && c <= '\u9fa5') {
                return i; // 返回第一个找到的汉字的位置
            }
        }
        return -1; // 没有找到汉字
    }

}